/* The dungeon graph is an abstract representation of the dungeon 
 * consisting of segments which are connected through entrances
 * and exits. It is used in the first step of random dungeon generation.
 */
#ifndef GRAPH_H_
#define GRAPH_H_

#include "segments.h"
#include "main.h"

#define START_PATHS (MAX_PLAYERS+4)
#define MAX_PATHS (MAX_PLAYERS*2)
#define MIN_PATHS MAX_PLAYERS

typedef struct {
	Segment* next [START_PATHS];
	Segment* segment_pool;
	int segpool_size;
	int num_segments;
} Graph;

extern void graph_init (Graph* g, int num_segments); // Generate a shitload of segments for use in the dungeon
extern void graph_connect (Graph* g); // Connect the segments to make the full dungeon and return the graph
extern void graph_cleanup (Graph* g); // Free the resources used in creating the Graph

#endif
 
